﻿@model ToWaDBFirst.Models.group

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>
@Html.ValidationSummary()
<fieldset>
    <legend>@Model.name</legend>

    <div class="display-label">Users</div>
    <div class="display-field">
        <ul>
            @foreach (var u in Model.usersingroups)
            {
                <li>
                    @u.user.username
                   
                </li>
            }
        </ul>
        @Html.ValidationMessageFor(model => model.usersingroups)
    </div>

</fieldset>
<p>
    @Html.ActionLink("Join Group", "Join", new { id = Model.id})
    @Html.ActionLink("Leave Group", "Leave", new { id = Model.id})
    @Html.ActionLink("Back to List", "Index")
</p>
